﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GTServices.Entities;
using Caliburn.Micro;
using System.Windows.Data;
using GTServices.WPF.Client.Interfaces;
namespace GTServices.WPF.Client.ViewModels.Entities
{
    public class TemplateViewModel : PropertyChangedBase, IEntityViewModel
    {
        private Template _template;
        public Template Template
        {
            get { return _template; }
            set
            {
                _template = value;
                NotifyOfPropertyChange(() => Template);
            }
        }

        public String Name
        {
            get { return Template.Name; }
            set
            {
                Template.Name = value;
                NotifyOfPropertyChange(() => this.Name);
            }
        }


        public Object Model
        {
            get { return Template; }
            set
            {
                if (value is Template)
                    Template = value as Template;
            }
        }
    }
}
